﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;

namespace Duckbill
{
    public class TitleState : BaseState
    {
        GameObject titleScreen;

        public TitleState()
        {
            titleScreen = new GameObject("title", Vector2.Zero);
            titleScreen.depth = 0.0f;
        }
        public override void Update(float time)
        {
            KeyboardState keys = Keyboard.GetState();

            if (keys.IsKeyDown(Keys.Z))
            {
                Game.states.Push(new LoadingState());
                new Thread(Game.StartGame).Start();
                //Game.StartGame();
            }
        }
        public override void Draw(SpriteBatch batch)
        {
            titleScreen.Draw(batch);
        }
    }
}
